﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
using System.IO;
using System.Xml;
using System.Text;
using RoadTeam.Standard;
using RoadTeam.Pase;
/// <summary>
///客服接口部分
/// </summary>
[WebService(Namespace = "http://www.roadteam.com.cn/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public partial class RoadTeamService : BaseService
{
    #region 验证用户登录信息[CheckLogin]
    [WebMethod(Description = "验证用户登录信息")]
    [SoapDocumentMethod]
    public LoginInfo CheckLogin(String LoginID, String Pwd)
    {
        try
        {
            return PaseStaff.CheckLogin(LoginID, Pwd);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("CheckLogin", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "LoginID:" + LoginID + "Pwd:" + Pwd);
        }
    }
    #endregion

    #region 插入[验房单集]对象集合[InsertHomeInspection]
    [WebMethod(Description = "插入[验房单集]对象集合")]
    [SoapDocumentMethod]
    public CsHomeInspection InsertHomeInspection(String Json)
    {
        try
        {
            return PaseHomeInspection.InsertHomeInspection(Json);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("InsertHomeInspection", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "Json:" + Json);
        }

    }
    #endregion

    #region 获取户型信息[GetDoorType]
    [WebMethod(Description = "获取户型信息")]
    [SoapDocumentMethod]
    public CsDoorType GetDoorType(String OrganIdentifier)
    {
        try
        {
            return PaseHomeInspection.GetDoorType(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetDoorType", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }
    }
    #endregion

    #region 获取房间类型信息[GetRoomTypeData]
    [WebMethod(Description = "获取房间类型信息")]
    [SoapDocumentMethod]
    public CsRoomType GetRoomTypeData(String OrganIdentifier)
    {
        try
        {
            return PaseHomeInspection.GetRoomTypeData(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetRoomTypeData", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }
    }
    #endregion

    #region 获取验收对象信息[GetValidateObjectData]
    [WebMethod(Description = "获取验收对象信息")]
    [SoapDocumentMethod]
    public CsValidateObject GetValidateObjectData(String OrganIdentifier)
    {
        try
        {
            return PaseHomeInspection.GetValidateObjectData(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetValidateObjectData", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }
    }

    #endregion

    #region 获取验收项目信息[GetValidateProData]
    [WebMethod(Description = "获取验收项目信息")]
    [SoapDocumentMethod]
    public CsValidatePro GetValidateProData(String OrganIdentifier)
    {
        try
        {
            return PaseHomeInspection.GetValidateProData(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetValidateProData", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }

    }
    #endregion

    #region 获取户型房间关系信息[GetDoorRoomRelaData]
    [WebMethod(Description = "获取户型房间关系信息")]
    [SoapDocumentMethod]
    public CsDoorRoomRela GetDoorRoomRelaData()
    {
        try
        {
            return PaseHomeInspection.GetDoorRoomRelaData();
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetDoorRoomRelaData", ex.Message, "1000", ex.Source, FaultCode.Server, ex, String.Empty);
        }

    }
    #endregion

    #region 获取房间验收对象关系信息[GetDoorRoomRelaData]
    [WebMethod(Description = "获取房间验收对象关系信息")]
    [SoapDocumentMethod]
    public CsRoomObjectRela GetRoomObjectRelaData()
    {
        try
        {
            return PaseHomeInspection.GetRoomObjectRelaData();
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetRoomObjectRelaData", ex.Message, "1000", ex.Source, FaultCode.Server, ex, String.Empty);
        }
    }
    #endregion

    #region 根据机构标识获取单元信息[GetUnitData]
    [WebMethod(Description = "根据机构标识获取单元信息")]
    [SoapDocumentMethod]
    public RmUnit GetUnitData(String OrganIdentifier)
    {
        try
        {
            return PaseUnit.GetUnitData(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetUnitData", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }

    }
    #endregion

    #region 同步到中间数据库后再获取字典值[GetDictDataSync]
    [WebMethod(Description = "同步到中间数据库后再获取字典值")]
    [SoapDocumentMethod]
    public PcDict GetDictDataSync(String DictCode)
    {
        try
        {
            return DictPase.GetDictDataSync(DictCode);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetDictDataSync", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "DictCode:" + DictCode);
        }
    }
    #endregion

    #region 获取维修项目信息[GetMaintanceProjectSync]
    [WebMethod(Description = "获取维修项目信息")]
    [SoapDocumentMethod]
    public CsMaintanceProject GetMaintanceProjectSync(String OrganIdentifier)
    {
        try
        {
            return PaseMaintance.GetMaintanceProjectSync(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetMaintanceProjectSync", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }
    }
    #endregion

    #region 插入维修单以及维修项目[InSertMaintenance]
    [WebMethod(Description = "插入维修单以及维修项目")]
    [SoapDocumentMethod]
    public CsMaintenance InSertMaintenance(string Json)
    {
        try
        {
            return PaseMaintance.InSertMaintenance(Json);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("InSertMaintenance", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "Json:" + Json);
        }
    }
    #endregion

    #region 插入维修单图片[InSertMaintenancePic]
    [WebMethod(Description = "插入维修单图片")]
    [SoapDocumentMethod]
    public bool InSertMaintenancePic(String Json, String Img)
    {
        try
        {
            return PaseMaintance.InSertMaintenancePic(Json, Img);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("InSertMaintenancePic", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "Json:" + Json + "Img:" + Img);
        }
    }
    #endregion

    #region 上传Json图片[UpLoadValidateFile]
    [WebMethod(Description = "上传Json图片")]
    [SoapDocumentMethod]
    public bool UpLoadValidateFile(String Json)
    {
        try
        {
            return PaseHomeInspection.UpLoadValidateFile(Json);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("UpLoadValidateFile", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "Json:" + Json);
        }
    }
    #endregion

    #region    获取单元总页数[GetUnitAllPageCount]
    [WebMethod(Description = "获取单元总页数")]
    [SoapDocumentMethod]
    public int GetUnitAllPageCount(String OrganIdentifier)
    {
        try
        {
            return PaseUnit.GetUnitAllPageCount(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetUnitAllPageCount", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }
    }
    #endregion

    #region 按照指定页数获取单元数据[GetUnitDataByPage]
    [WebMethod(Description = "按照指定页数获取单元数据")]
    [SoapDocumentMethod]
    public RmUnit2 GetUnitDataByPage(String OrganIdentifier, int PageSize, int CurrentPage)
    {
        try
        {
            return RoadTeam.Pase.PaseUnit.GetUnitDataByPage(OrganIdentifier, CurrentPage, PageSize);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetUnitDataByPage", ex.Message, "1000", ex.Source, FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier + "CurrentPage:" + CurrentPage + "PageSize:" + PageSize);
        }
    }
    #endregion

    #region 按照指定页数获取验房项目[GetValidatePro2DataByPage]
    [WebMethod(Description = "按照指定页数获取验房项目")]
    [SoapDocumentMethod]
    public CsValidatePro2 GetValidatePro2DataByPage(String OrganIdentifier, int CurrentPage, int PageSize)
    {
        try
        {
            return RoadTeam.Pase.PaseHomeInspection.GetValidatePro2DataByPage(OrganIdentifier, CurrentPage, PageSize);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetValidatePro2DataByPage", ex.Message, "1000", ex.Source,
                FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier + "CurrentPage:" + CurrentPage + "PageSize:" + PageSize);
        }
    }
    #endregion

    #region 获取验房项目的总条数[GetValidateProDataAllPageCount]
    [WebMethod(Description = "获取验房项目的总条数")]
    [SoapDocumentMethod]
    public int GetValidateProDataAllPageCount(String OrganIdentifier)
    {
        try
        {
            return RoadTeam.Pase.PaseHomeInspection.GetValidateProDataAllPageCount(OrganIdentifier);
        }
        catch (System.Exception ex)
        {
            throw RaiseException("GetValidateProDataAllPageCount", ex.Message, "1000", ex.Source,
                FaultCode.Server, ex, "OrganIdentifier:" + OrganIdentifier);
        }
    }
    #endregion
}
